{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import yaml\n",
    "import json\n",
    "import numpy as np\n",
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "smarthome_rangehood_stories.yml: 2 stories\n",
      "smarthome_Lamp_story.yml: 39 stories\n",
      "smarthome_fan_story.yml: 12 stories\n",
      "smarthome_humidifier_story.yml: 5 stories\n",
      "smarthome_ricecooker_stories.yml: 3 stories\n",
      "smarthome_curtain_story.yml: 6 stories\n",
      "smarthome_oven_story.yml: 4 stories\n",
      "smarthome_AC_story.yml: 41 stories\n",
      "all stories:  112\n"
     ]
    }
   ],
   "source": [
    "stories_list = os.listdir(\"./stories/\")\n",
    "stories_list = [item for item in stories_list if item !=\".ipynb_checkpoints\"]\n",
    "stories_list\n",
    "# 批量导入设备场景的story\n",
    "story_data = []\n",
    "for file_name in stories_list:\n",
    "    path = \"./stories/{}\".format(file_name)\n",
    "    with open(path,\"r\",encoding=\"utf-8\") as f:\n",
    "        original_dataset = yaml.load(f.read(),Loader=yaml.Loader)\n",
    "    stories = original_dataset[\"stories\"]\n",
    "    print(\"{}: {} stories\".format(file_name,len(stories)))\n",
    "    for item in stories:\n",
    "        story_data.append(item)\n",
    "print(\"all stories: \",len(story_data))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'story': 'greet',\n",
       "  'steps': [{'intent': 'greet'}, {'action': 'utter_answer_greet'}]},\n",
       " {'story': 'say affirm  with greet',\n",
       "  'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'affirm'},\n",
       "   {'action': 'utter_answer_affirm'}]},\n",
       " {'story': 'say no with greet',\n",
       "  'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'deny'},\n",
       "   {'action': 'utter_answer_deny'}]},\n",
       " {'story': 'say no',\n",
       "  'steps': [{'intent': 'deny'}, {'action': 'utter_answer_deny'}]},\n",
       " {'story': 'say goodbye',\n",
       "  'steps': [{'intent': 'goodbye'}, {'action': 'utter_answer_goodbye'}]},\n",
       " {'story': 'thanks with greet',\n",
       "  'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'thanks'},\n",
       "   {'action': 'utter_answer_thanks'}]},\n",
       " {'story': 'thanks',\n",
       "  'steps': [{'intent': 'thanks'}, {'action': 'utter_answer_thanks'}]},\n",
       " {'story': 'who are you with greet',\n",
       "  'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'whoareyou'},\n",
       "   {'action': 'utter_answer_whoareyou'}]},\n",
       " {'story': 'who are you',\n",
       "  'steps': [{'intent': 'whoareyou'}, {'action': 'utter_answer_whoareyou'}]},\n",
       " {'story': 'who are you with greet',\n",
       "  'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'whoareyou'},\n",
       "   {'action': 'utter_answer_whoareyou'}]},\n",
       " {'story': 'what to do',\n",
       "  'steps': [{'intent': 'whattodo'}, {'action': 'utter_answer_whattodo'}]},\n",
       " {'story': 'what to do with greet',\n",
       "  'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'whattodo'},\n",
       "   {'action': 'utter_answer_whattodo'}]},\n",
       " {'story': 'chitchat',\n",
       "  'steps': [{'intent': 'chitchat'}, {'action': 'utter_chitchat'}]},\n",
       " {'story': '询问日期',\n",
       "  'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'request_datetime', 'entities': [{'date_time': '今天'}]},\n",
       "   {'action': 'action_answer_requestdatetime'}]},\n",
       " {'story': '询问日期，连续询问',\n",
       "  'steps': [{'intent': 'request_datetime', 'entities': [{'date_time': '今天'}]},\n",
       "   {'action': 'action_answer_requestdatetime'},\n",
       "   {'intent': 'request_datetime', 'entities': [{'date_time': '明天'}]},\n",
       "   {'action': 'action_answer_requestdatetime'},\n",
       "   {'intent': 'request_datetime', 'entities': [{'date_time': '后天'}]},\n",
       "   {'action': 'action_answer_requestdatetime'}]},\n",
       " {'story': '询问周几',\n",
       "  'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'request_weekday', 'entities': [{'date_time': '今天'}]},\n",
       "   {'action': 'action_answer_requestweekday'}]},\n",
       " {'story': '询问周几，连续询问',\n",
       "  'steps': [{'intent': 'request_weekday', 'entities': [{'date_time': '今天'}]},\n",
       "   {'action': 'action_answer_requestweekday'},\n",
       "   {'intent': 'request_datetime', 'entities': [{'date_time': '明天'}]},\n",
       "   {'action': 'action_answer_requestweekday'},\n",
       "   {'intent': 'request_datetime', 'entities': [{'date_time': '后天'}]},\n",
       "   {'action': 'action_answer_requestweekday'}]},\n",
       " {'story': '询问时间',\n",
       "  'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'request_time'},\n",
       "   {'action': 'action_answer_time'}]},\n",
       " {'story': '询问天气',\n",
       "  'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'request_weather'},\n",
       "   {'action': 'utter_answer_requestweather'}]},\n",
       " {'story': '询问天气2',\n",
       "  'steps': [{'intent': 'request_weather'},\n",
       "   {'action': 'utter_answer_requestweather'}]},\n",
       " {'story': '询问天气3',\n",
       "  'steps': [{'intent': 'request_weather', 'entities': [{'date_time': '今天'}]},\n",
       "   {'slot_was_set': [{'date_time': '今天'}]},\n",
       "   {'action': 'utter_answer_requestweather'}]},\n",
       " {'story': '抽油烟机的开关状态控制自定义对话模板 打开/关闭 抽油烟机',\n",
       "  'steps': [{'intent': 'Control-RangHood_State',\n",
       "    'entities': [{'operation': '打开'}, {'device': '抽油烟机'}]},\n",
       "   {'action': 'action_rangehood'}]},\n",
       " {'story': '抽油烟机的开关状态控制自定义对话模板 打开/关闭 抽油烟机 强力模式',\n",
       "  'steps': [{'intent': 'Control-RangHood_State',\n",
       "    'entities': [{'operation': '打开'}, {'device': '抽油烟机'}, {'mode': '强力模式'}]},\n",
       "   {'action': 'action_rangehood'}]},\n",
       " {'story': 'open lamp--具体灯具设备指明',\n",
       "  'steps': [{'intent': 'Control-Lamp_Open',\n",
       "    'entities': [{'device': '主卧灯'}, {'address': '主卧'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_open_lamp'}]},\n",
       " {'story': 'open Lamp2--未指明具体灯具设备/询问具体设备/确认灯具/执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Open',\n",
       "    'entities': [{'device': '灯'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'intent': 'inform_lamp', 'entities': [{'device': '灯'}, {'address': '客厅'}]},\n",
       "   {'action': 'action_open_lamp'}]},\n",
       " {'story': 'open Lamp2--未指明具体灯具设备/询问具体设备/确认房间/执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Open',\n",
       "    'entities': [{'device': '灯'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '客厅'}]},\n",
       "   {'action': 'action_open_lamp'}]},\n",
       " {'story': 'open Lamp2--未指明具体灯具设备/询问具体设备/确认所有灯具/执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Open',\n",
       "    'entities': [{'device': '灯'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'intent': 'inform_range', 'entities': [{'range': '所有'}]},\n",
       "   {'action': 'action_open_lamp'}]},\n",
       " {'story': 'open Lamp3--指明所有的灯',\n",
       "  'steps': [{'intent': 'Control-Lamp_Open',\n",
       "    'entities': [{'range': '所有'}, {'device': '灯'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_open_lamp'}]},\n",
       " {'story': '硬编码回复灯具打开--澄清具体设备/用户确认设备/执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Open',\n",
       "    'entities': [{'operation': '开'}, {'device': '灯'}]},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'intent': 'inform_lamp', 'entities': [{'device': '灯'}, {'address': '客厅'}]},\n",
       "   {'action': 'action_open_lamp'}]},\n",
       " {'story': '硬编码回复灯具打开--澄清具体设备/用户确认房间/执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Open',\n",
       "    'entities': [{'operation': '开'}, {'device': '灯'}]},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '客厅'}]},\n",
       "   {'action': 'action_open_lamp'}]},\n",
       " {'story': 'close Lamp1--具体指明灯具设备',\n",
       "  'steps': [{'intent': 'Control-Lamp_Close',\n",
       "    'entities': [{'device': '灯'}, {'address': '餐厅'}, {'operation': '关闭'}]},\n",
       "   {'action': 'action_close_lamp'}]},\n",
       " {'story': 'close Lamp2--未指明灯具设备，需要进一步澄清',\n",
       "  'steps': [{'intent': 'Control-Lamp_Close',\n",
       "    'entities': [{'device': '灯'}, {'operation': '关闭'}]},\n",
       "   {'action': 'action_close_lamp'},\n",
       "   {'intent': 'inform_lamp', 'entities': [{'device': '灯'}, {'address': '餐厅'}]},\n",
       "   {'action': 'action_close_lamp'}]},\n",
       " {'story': 'close Lamp2--未指明灯具设备，澄清全部的灯',\n",
       "  'steps': [{'intent': 'Control-Lamp_Close',\n",
       "    'entities': [{'device': '灯'}, {'operation': '关闭'}]},\n",
       "   {'action': 'action_close_lamp'},\n",
       "   {'intent': 'inform_range', 'entities': [{'range': '所有'}]},\n",
       "   {'action': 'action_close_lamp'}]},\n",
       " {'story': 'close Lamp3--指明所有的灯具设备',\n",
       "  'steps': [{'intent': 'Control-Lamp_Close',\n",
       "    'entities': [{'device': '灯'}, {'range': '所有'}, {'operation': '关闭'}]},\n",
       "   {'action': 'action_close_lamp'}]},\n",
       " {'story': '硬编码回复控制灯具关闭',\n",
       "  'steps': [{'intent': 'Control-Lamp_Close',\n",
       "    'entities': [{'operation': '关'}, {'device': '灯'}]},\n",
       "   {'action': 'action_close_lamp'},\n",
       "   {'intent': 'inform_lamp', 'entities': [{'device': '灯'}, {'address': '餐厅'}]},\n",
       "   {'action': 'action_close_lamp'}]},\n",
       " {'story': '硬编码回复控制灯具关闭 回复全部的情况',\n",
       "  'steps': [{'intent': 'Control-Lamp_Close',\n",
       "    'entities': [{'operation': '关'}, {'device': '灯'}]},\n",
       "   {'action': 'action_close_lamp'},\n",
       "   {'intent': 'inform_range', 'entities': [{'range': '所有'}]},\n",
       "   {'action': 'action_close_lamp'}]},\n",
       " {'story': '调整灯的亮度(无指明具体灯光设备)/确认房间/执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Lightness',\n",
       "    'entities': [{'operation': '调高'}, {'device': '灯'}]},\n",
       "   {'action': 'action_controllamplightness'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'action_controllamplightness'}]},\n",
       " {'story': '调低灯的亮度(无指明具体灯光设备)/确认房间/执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Lightness',\n",
       "    'entities': [{'operation': '调低'}, {'device': '灯'}]},\n",
       "   {'action': 'action_controllamplightness'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '客厅'}]},\n",
       "   {'action': 'action_controllamplightness'}]},\n",
       " {'story': '调低灯的亮度(澄清具体灯具设备)/确认设备/执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Lightness',\n",
       "    'entities': [{'operation': '调低'}, {'device': '灯光'}]},\n",
       "   {'action': 'action_controllamplightness'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'action_controllamplightness'}]},\n",
       " {'story': '调整灯的亮度(指明具体房间灯光设备)/执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Lightness',\n",
       "    'entities': [{'operation': '调高'}, {'device': '灯'}, {'address': '客厅'}]},\n",
       "   {'action': 'action_controllamplightness'}]},\n",
       " {'story': '调整灯的亮度(指明具体房间灯光设备 最大亮度&中等亮度&最小亮度)/执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Lightness',\n",
       "    'entities': [{'sensorvalue': '最大亮度'}, {'device': '灯'}, {'address': '客厅'}]},\n",
       "   {'action': 'action_controllamplightness'}]},\n",
       " {'story': 'interactive_story_1 调整灯光亮度/打开/调到最亮/调到最暗/询问设备/确认设备/执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '灯'}, {'address': '主卧'}]},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'intent': 'Control-Lamp_Lightness', 'entities': [{'sensorvalue': '最大亮度'}]},\n",
       "   {'action': 'action_controllamplightness'},\n",
       "   {'intent': 'Control-Lamp_Lightness', 'entities': [{'sensorvalue': '最低亮度'}]},\n",
       "   {'action': 'action_controllamplightness'}]},\n",
       " {'story': 'interactive_story_1 打开台灯/台灯调亮',\n",
       "  'steps': [{'intent': 'Control-Lamp_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '台灯'}]},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'intent': 'Control-Lamp_Lightness',\n",
       "    'entities': [{'device': '台灯'}, {'operation': '调亮'}]},\n",
       "   {'action': 'action_controllamplightness'}]},\n",
       " {'story': '打开XX灯/最低亮度',\n",
       "  'steps': [{'intent': 'Control-Lamp_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '灯'}, {'address': '厕所'}]},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'intent': 'inform_sensorvalue', 'entities': [{'sensorvalue': '最低亮度'}]},\n",
       "   {'action': 'action_controllamplightness'}]},\n",
       " {'story': '打开XX灯/最大亮度(intent识别为inform sensorvalue情况)',\n",
       "  'steps': [{'intent': 'Control-Lamp_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '灯'}, {'address': '主卧'}]},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'intent': 'inform_sensorvalue', 'entities': [{'sensorvalue': '最大亮度'}]},\n",
       "   {'action': 'action_controllamplightness'}]},\n",
       " {'story': '打开厨房灯/最大亮度(intent识别为Control-Lamp_Lightness情况)/正常回复',\n",
       "  'steps': [{'intent': 'Control-Lamp_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '灯'}, {'address': '厨房'}]},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'intent': 'Control-Lamp_Lightness', 'entities': [{'sensorvalue': '最大亮度'}]},\n",
       "   {'action': 'action_controllamplightness'}]},\n",
       " {'story': '控制灯光模式(槽位信息齐全)/直接执行Action',\n",
       "  'steps': [{'intent': 'Control-Lamp_Mode',\n",
       "    'entities': [{'device': '灯'}, {'address': '客厅'}, {'mode': '明亮模式'}]},\n",
       "   {'action': 'lampmode_form'}]},\n",
       " {'story': '控制灯光颜色(槽位信息齐全)/直接执行Action',\n",
       "  'steps': [{'intent': 'Control-Lamp_Color',\n",
       "    'entities': [{'device': '灯'}, {'color': '冷色'}, {'address': '客厅'}]},\n",
       "   {'action': 'lampcolor_form'}]},\n",
       " {'story': '控制灯光的模式(灯具信息齐全 目标模式信息不全，需要澄清目标信息)/询问需要调整成什么模式/确认执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Mode',\n",
       "    'entities': [{'device': '灯'}, {'mode': '温馨模式'}, {'address': '客厅'}]},\n",
       "   {'action': 'lampmode_form'}]},\n",
       " {'story': '控制灯光的颜色(灯具信息齐全 目标模式信息不全，需要澄清目标信息)/询问需要调整成什么模式/确认执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Color',\n",
       "    'entities': [{'device': '灯'}, {'address': '客厅'}, {'color': '红色'}]},\n",
       "   {'action': 'lampcolor_form'}]},\n",
       " {'story': '控制灯光的模式(灯具信息不齐全 目标模式信息不全，需要逐个澄清)/询问房间(具体灯具)/询问需要调整成什么模式/确认执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Mode',\n",
       "    'entities': [{'device': '灯'}, {'address': '客厅'}, {'mode': '明亮模式'}]},\n",
       "   {'action': 'lampmode_form'}]},\n",
       " {'story': '控制灯光的颜色(灯具信息不齐全 目标模式信息不全，需要逐个澄清)/询问房间(具体灯具)/询问需要调整成什么模式/确认执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Color',\n",
       "    'entities': [{'device': '灯'}, {'address': '客厅'}, {'color': '暖色'}]},\n",
       "   {'action': 'lampcolor_form'}]},\n",
       " {'story': '控制灯光的模式(灯具信息缺少指定房间信息)',\n",
       "  'steps': [{'intent': 'Control-Lamp_Mode', 'entities': [{'device': '灯'}]},\n",
       "   {'action': 'lampmode_form', 'entities': [{'mode': '明亮模式'}]},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'lampmode_form'}]},\n",
       " {'story': '控制灯光的颜色(灯具信息缺少指定房间信息)',\n",
       "  'steps': [{'intent': 'Control-Lamp_Color', 'entities': [{'device': '灯'}]},\n",
       "   {'action': 'lampcolor_form', 'entities': [{'color': '暖色'}]},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '客卧'}]},\n",
       "   {'action': 'lampcolor_form'}]},\n",
       " {'story': '控制灯光的颜色 (切换色调，询问色调)',\n",
       "  'steps': [{'intent': 'Control-Lamp_Color',\n",
       "    'entities': [{'device': '灯'},\n",
       "     {'address': '客厅'},\n",
       "     {'target': '颜色'},\n",
       "     {'operation': '调整'},\n",
       "     {'color': '红色'}]},\n",
       "   {'action': 'lampcolor_form'},\n",
       "   {'intent': 'Control-Lamp_Color',\n",
       "    'entities': [{'operation': '切换'}, {'target': '色调'}, {'color': '暖色'}]},\n",
       "   {'action': 'lampcolor_form'}]},\n",
       " {'story': '控制灯光定时操作，所有信息齐全/无需澄清槽位信息/直接执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Timing',\n",
       "    'entities': [{'time': '一小时'},\n",
       "     {'operation': '打开'},\n",
       "     {'device': '灯'},\n",
       "     {'address': '主卧'}]},\n",
       "   {'action': 'lamptiming_form'}]},\n",
       " {'story': '控制灯光定时操作 定时关闭客厅灯(灯具指明)/澄清定时时间',\n",
       "  'steps': [{'intent': 'Control-Lamp_Timing',\n",
       "    'entities': [{'operation': '关闭'},\n",
       "     {'device': '灯'},\n",
       "     {'address': '客厅'},\n",
       "     {'time': '两小时'}]},\n",
       "   {'action': 'lamptiming_form'}]},\n",
       " {'story': '控制灯光定时操作 定时关闭灯(灯具信息未指明 其他信息齐全)/澄清具体设备/用户回复具体 [灯具] /继续执行',\n",
       "  'steps': [{'intent': 'Control-Lamp_Timing',\n",
       "    'entities': [{'time': '一小时'}, {'operation': '关闭'}, {'device': '灯'}]},\n",
       "   {'action': 'lamptiming_form'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'lamptiming_form'}]},\n",
       " {'story': '隐式表达想要调整灯光亮度/询问具体灯具/询问是否调整/确认/亮度调整',\n",
       "  'steps': [{'intent': 'latent_control_lamplight'},\n",
       "   {'action': 'action_latent_control_lamplight'},\n",
       "   {'intent': 'inform_lamp'},\n",
       "   {'action': 'action_latent_control_lamplight'},\n",
       "   {'intent': 'affirm'},\n",
       "   {'action': 'action_affirm_controllamplight'}]},\n",
       " {'story': '隐式表达想要调整灯光亮度/询问具体灯具/询问是否调整/拒绝/槽位清空',\n",
       "  'steps': [{'intent': 'latent_control_lamplight'},\n",
       "   {'action': 'action_latent_control_lamplight'},\n",
       "   {'intent': 'inform_lamp'},\n",
       "   {'action': 'action_latent_control_lamplight'},\n",
       "   {'intent': 'deny'},\n",
       "   {'action': 'action_deny_controllamplight'}]},\n",
       " {'story': '隐式表达想要调整灯光亮度/询问是否调整/确认/亮度调整',\n",
       "  'steps': [{'intent': 'latent_control_lamplight'},\n",
       "   {'action': 'action_latent_control_lamplight'},\n",
       "   {'intent': 'affirm'},\n",
       "   {'action': 'action_affirm_controllamplight'}]},\n",
       " {'story': '隐式表达想要调整灯光亮度/询问是否调整/拒绝/槽位清空',\n",
       "  'steps': [{'intent': 'latent_control_lamplight'},\n",
       "   {'action': 'action_latent_control_lamplight'},\n",
       "   {'intent': 'deny'},\n",
       "   {'action': 'action_deny_controllamplight'}]},\n",
       " {'story': 'open or close 风扇--无具体需要指明的设备名称，单独的',\n",
       "  'steps': [{'intent': 'Control-Fan_State',\n",
       "    'entities': [{'device': '风扇'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_fan_state'}]},\n",
       " {'story': 'open or close 风扇--无具体需要指明的设备名称，单独的',\n",
       "  'steps': [{'intent': 'Control-Fan_State',\n",
       "    'entities': [{'device': '风扇'}, {'operation': '关闭'}]},\n",
       "   {'action': 'action_fan_state'}]},\n",
       " {'story': '调整风扇的风速(所有信息齐全，具体的风扇设备，风速调高或者是调低)/执行',\n",
       "  'steps': [{'intent': 'Control-Fan_Wind',\n",
       "    'entities': [{'operation': '增大风速'}, {'device': '风扇'}]},\n",
       "   {'action': 'action_controlDeviceWind'}]},\n",
       " {'story': '调整风扇的风速(所有信息齐全，具体的风扇设备，风速具体参数值(最大风速/最小风速/中等风速))/执行',\n",
       "  'steps': [{'intent': 'Control-Fan_Wind',\n",
       "    'entities': [{'sensorvalue': '最大风速'}, {'device': '风扇'}]},\n",
       "   {'action': 'action_controlDeviceWind'}]},\n",
       " {'story': '调整风扇的风速(所有信息齐全，具体的风扇设备，风速具体参数值(最大风速/最小风速/中等风速))/执行',\n",
       "  'steps': [{'intent': 'Control-Fan_Wind',\n",
       "    'entities': [{'sensorvalue': '中等风速'}, {'device': '风扇'}]},\n",
       "   {'action': 'action_controlDeviceWind'}]},\n",
       " {'story': '调整风扇的档位级别(所有信息齐全，具体的风扇设备，档位具体参数值(三档/二挡/一档))/执行',\n",
       "  'steps': [{'intent': 'Control-Fan_Gear',\n",
       "    'entities': [{'sensorvalue': '三档'}, {'device': '风扇'}]},\n",
       "   {'action': 'action_fan_gear'}]},\n",
       " {'story': '调整风扇的档位级别(所有信息齐全，具体的风扇设备，档位调高调低)/执行',\n",
       "  'steps': [{'intent': 'Control-Fan_Gear',\n",
       "    'entities': [{'operation': '调高'}, {'device': '风扇'}]},\n",
       "   {'action': 'action_fan_gear'}]},\n",
       " {'story': '调整风扇的模式(所有信息齐全，具体的风扇设备，具体模式) 风扇调整至XX模式 /执行',\n",
       "  'steps': [{'intent': 'Control-Fan_Mode',\n",
       "    'entities': [{'mode': '左右扫风'}, {'device': '风扇'}]},\n",
       "   {'action': 'action_fan_mode'}]},\n",
       " {'story': '调整风扇的模式(所有信息齐全，具体的风扇设备，具体模式) 风扇XX模式关闭 关闭XX模式 /执行',\n",
       "  'steps': [{'intent': 'Control-Fan_Mode',\n",
       "    'entities': [{'mode': '左右扫风'}, {'device': '风扇'}, {'operation': '关闭'}]},\n",
       "   {'action': 'action_fan_mode'}]},\n",
       " {'story': '控制风扇定时操作，所有信息齐全/无需澄清槽位信息/直接执行',\n",
       "  'steps': [{'intent': 'Control-Fan_Timing',\n",
       "    'entities': [{'time': '一小时'}, {'operation': '关闭'}, {'device': '风扇'}]},\n",
       "   {'action': 'fantiming_form'}]},\n",
       " {'story': '打开风扇/定时一小时(已有槽位operation打开)/执行定时一小时后打开风扇',\n",
       "  'steps': [{'intent': 'Control-Fan_State',\n",
       "    'entities': [{'operation': '打开'}, {'device': '风扇'}]},\n",
       "   {'action': 'action_fan_state'},\n",
       "   {'intent': 'Control-Fan_Timing', 'entities': [{'time': '一小时'}]},\n",
       "   {'action': 'fantiming_form'}]},\n",
       " {'story': '打开风扇/定时一个小时(没有operation槽位信息 需要澄清)/请问执行什么操作/关闭/已为您设置风扇一小时后关闭',\n",
       "  'steps': [{'intent': 'Control-Fan_State',\n",
       "    'entities': [{'operation': '打开'}, {'device': '风扇'}]},\n",
       "   {'action': 'action_fan_state'},\n",
       "   {'intent': 'Control-Fan_Timing', 'entities': [{'time': '一小时'}]},\n",
       "   {'action': 'fantiming_form'}]},\n",
       " {'story': '加湿器的开关状态控制自定义对话模板 打开/关闭 加湿器',\n",
       "  'steps': [{'intent': 'Control-Humidifier_State',\n",
       "    'entities': [{'operation': '打开'}, {'device': '加湿器'}]},\n",
       "   {'action': 'action_humidifierstate'}]},\n",
       " {'story': '调整加湿器的档位级别(所有信息齐全，具体的加湿器设备，档位具体参数值(三档/二挡/一档))/执行',\n",
       "  'steps': [{'intent': 'Control-Humidifier_Gear',\n",
       "    'entities': [{'gear_level': '三档'}, {'device': '加湿器'}]},\n",
       "   {'action': 'action_humidifiergear'}]},\n",
       " {'story': '调整加湿器的档位级别(所有信息齐全 ，具体的加湿器设备，档位调高调低)/执行',\n",
       "  'steps': [{'intent': 'Control-Humidifier_Gear',\n",
       "    'entities': [{'operation': '调高'}, {'device': '加湿器'}]},\n",
       "   {'action': 'action_humidifiergear'}]},\n",
       " {'story': '加湿器的定时控制自定义对话模板 定时X小时关闭',\n",
       "  'steps': [{'intent': 'Control-Humidifier_Timing',\n",
       "    'entities': [{'device': '加湿器'}, {'time': '一个小时'}, {'operation': '关闭'}]},\n",
       "   {'action': 'action_humidifiertiming'}]},\n",
       " {'story': '针对加湿器查询当前室内湿度值',\n",
       "  'steps': [{'intent': 'Request-Humidifier_Humidity'},\n",
       "   {'action': 'action_requesthumidity'}]},\n",
       " {'story': '电饭煲的开关状态控制自定义对话模板 打开/关闭 电饭煲',\n",
       "  'steps': [{'intent': 'Control-RiceCooker_State',\n",
       "    'entities': [{'operation': '打开'}, {'device': '电饭煲'}]},\n",
       "   {'action': 'action_RiceCookerstate'}]},\n",
       " {'story': '电饭煲的模式状态控制自定义对话模板 电饭煲 煲汤模式',\n",
       "  'steps': [{'intent': 'Control-RiceCooker_Mode',\n",
       "    'entities': [{'device': '电饭煲'}, {'mode': '煲汤模式'}]},\n",
       "   {'action': 'action_RiceCookermode'}]},\n",
       " {'story': '电饭煲的开关状态控制自定义对话模板 定时X小时做好',\n",
       "  'steps': [{'intent': 'Control-RiceCooker_Timing',\n",
       "    'entities': [{'device': '电饭煲'}, {'time': '一个小时'}]},\n",
       "   {'action': 'action_RiceCookertiming'}]},\n",
       " {'story': 'open or close 窗帘--无具体需要指明的设备名称，单独的，没有附加参数值',\n",
       "  'steps': [{'intent': 'Control-Curtain_State',\n",
       "    'entities': [{'device': '窗帘'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_curtain_state'}]},\n",
       " {'story': 'open or close 窗帘--无具体需要指明的设备名称，单独的，带有附加参数值',\n",
       "  'steps': [{'intent': 'Control-Curtain_State',\n",
       "    'entities': [{'device': '窗帘'},\n",
       "     {'operation': '打开'},\n",
       "     {'sensorvalue': '一半'}]},\n",
       "   {'action': 'action_curtain_state'}]},\n",
       " {'story': 'open or close 窗帘--无具体需要指明的设备名称，单独的 没有附加的参数值',\n",
       "  'steps': [{'intent': 'Control-Curtain_State',\n",
       "    'entities': [{'device': '窗帘'}, {'operation': '关闭'}]},\n",
       "   {'action': 'action_curtain_state'}]},\n",
       " {'story': 'open or close 窗帘--无具体需要指明的设备名称，单独的 没有附加的参数值',\n",
       "  'steps': [{'intent': 'Control-Curtain_State',\n",
       "    'entities': [{'device': '窗帘'},\n",
       "     {'operation': '关闭'},\n",
       "     {'sensorvalue': '一半'}]},\n",
       "   {'action': 'action_curtain_state'}]},\n",
       " {'story': 'timing 窗帘--定时操作 打开，单独的 没有附加的参数值',\n",
       "  'steps': [{'intent': 'Control-Curtain_Timing',\n",
       "    'entities': [{'device': '窗帘'},\n",
       "     {'date_time': '明天早上'},\n",
       "     {'time': '七点半'},\n",
       "     {'operation': '打开'}]},\n",
       "   {'action': 'action_curtain_timing'}]},\n",
       " {'story': 'open or close 窗帘--无具体需要指明的设备名称，单独的 没有附加的参数值',\n",
       "  'steps': [{'intent': 'Control-Curtain_Timing',\n",
       "    'entities': [{'device': '窗帘'},\n",
       "     {'date_time': '明天早上'},\n",
       "     {'time': '七点半'},\n",
       "     {'operation': '打开'},\n",
       "     {'sensorvalue': '一半'}]},\n",
       "   {'action': 'action_curtain_timing'}]},\n",
       " {'story': 'open or close 烤箱--无具体需要指明的设备名称，单独的',\n",
       "  'steps': [{'intent': 'Control-Oven_State',\n",
       "    'entities': [{'device': '烤箱'}, {'operation': '启动'}]},\n",
       "   {'action': 'action_ovenstate'}]},\n",
       " {'story': 'open or close 烤箱--无具体需要指明的设备名称，单独的',\n",
       "  'steps': [{'intent': 'Control-Oven_State',\n",
       "    'entities': [{'device': '烤箱'}, {'operation': '关闭'}]},\n",
       "   {'action': 'action_ovenstate'}]},\n",
       " {'story': '调整烤箱的模式(所有信息齐全，具体的烤箱设备，具体模式) 烤箱调整至XX模式 /执行',\n",
       "  'steps': [{'intent': 'Control-Oven_Mode',\n",
       "    'entities': [{'mode': '烤鸡模式'}, {'device': '烤箱'}]},\n",
       "   {'action': 'action_ovenmode'}]},\n",
       " {'story': '烤箱温度控制  所有信息齐全 xx烤箱 温度 设置为 X度',\n",
       "  'steps': [{'intent': 'Control-Oven_Temp',\n",
       "    'entities': [{'device': '烤箱'}, {'temperature': '一百八十度'}]},\n",
       "   {'action': 'action_oventemp'}]},\n",
       " {'story': 'open AC--具体空调设备指明',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'address': '主卧'}, {'device': '空调'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_open_ac'}]},\n",
       " {'story': 'open AC2--未指明具体空调设备/询问具体设备/确认空调/执行',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'device': '空调'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'address': '客厅'}, {'device': '空调'}]},\n",
       "   {'action': 'action_open_ac'}]},\n",
       " {'story': 'open AC3--未指明具体空调设备/询问具体设备/确认房间/执行',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'device': '空调'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '客厅'}]},\n",
       "   {'action': 'action_open_ac'}]},\n",
       " {'story': 'open AC4--未指明具体空调设备/询问具体设备/确认全部的空调/执行',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'device': '空调'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'inform_range', 'entities': [{'range': '所有'}]},\n",
       "   {'action': 'action_open_ac'}]},\n",
       " {'story': 'open AC3--指明所有的空调',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'range': '所有'}, {'device': '空调'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_open_ac'}]},\n",
       " {'story': '硬编码回复空调打开--澄清具体设备/用户确认设备/执行',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '空调'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'device': '空调'}, {'address': '客厅'}]},\n",
       "   {'action': 'action_open_ac'}]},\n",
       " {'story': '硬编码回复空调设备打开--澄清具体设备/用户确认房间/执行',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '空调'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '客厅'}]},\n",
       "   {'action': 'action_open_ac'}]},\n",
       " {'story': 'close AC1--具体指明空调设备',\n",
       "  'steps': [{'intent': 'Control-AC_Close',\n",
       "    'entities': [{'address': '客厅'}, {'device': '空调'}, {'operation': '关闭'}]},\n",
       "   {'action': 'action_close_ac'}]},\n",
       " {'story': 'close AC2--未指明具体空调设备，需要进一步澄清',\n",
       "  'steps': [{'intent': 'Control-AC_Close',\n",
       "    'entities': [{'device': '空调'}, {'operation': '关闭'}]},\n",
       "   {'action': 'action_close_ac'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'address': '客厅'}, {'device': '空调'}]},\n",
       "   {'action': 'action_close_ac'}]},\n",
       " {'story': 'close AC3--指明所有的空调设备',\n",
       "  'steps': [{'intent': 'Control-AC_Close',\n",
       "    'entities': [{'range': '所有'}, {'device': '空调'}, {'operation': '关闭'}]},\n",
       "   {'action': 'action_close_ac'}]},\n",
       " {'story': '硬编码回复控制空调关闭 确认具体空调设备',\n",
       "  'steps': [{'intent': 'Control-AC_Close',\n",
       "    'entities': [{'operation': '关闭'}, {'device': '空调'}]},\n",
       "   {'action': 'action_close_ac'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'device': '空调'}, {'address': '书房'}]},\n",
       "   {'action': 'action_close_ac'}]},\n",
       " {'story': '硬编码回复控制空调关闭 确认具体房间',\n",
       "  'steps': [{'intent': 'Control-AC_Close',\n",
       "    'entities': [{'operation': '关闭'}, {'device': '空调'}]},\n",
       "   {'action': 'action_close_ac'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'action_close_ac'}]},\n",
       " {'story': '硬编码回复控制空调关闭 确认全部的空调',\n",
       "  'steps': [{'intent': 'Control-AC_Close',\n",
       "    'entities': [{'operation': '关闭'}, {'device': '空调'}]},\n",
       "   {'action': 'action_close_ac'},\n",
       "   {'intent': 'inform_range', 'entities': [{'range': '所有'}]},\n",
       "   {'action': 'action_close_ac'}]},\n",
       " {'story': '控制空调模式/(槽位信息齐全)/直接执行Action',\n",
       "  'steps': [{'intent': 'Control-AC_Mode',\n",
       "    'entities': [{'address': '客厅'}, {'device': '空调'}, {'mode': '制热模式'}]},\n",
       "   {'action': 'acmode_form'}]},\n",
       " {'story': '调整空调模式(未指明具体房间空调但目标模式齐全)/询问房间(具体空调)/确认/执行',\n",
       "  'steps': [{'intent': 'Control-AC_Mode', 'entities': [{'mode': '节能模式'}]},\n",
       "   {'action': 'acmode_form'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'address': '客厅'}, {'device': '空调'}]},\n",
       "   {'action': 'acmode_form'}]},\n",
       " {'story': 'interactive_story_1 调整空调模式(未指明具体空调设备)/询问具体设备/回复房间/调用acmode_form进行执行',\n",
       "  'steps': [{'intent': 'Control-AC_Mode',\n",
       "    'entities': [{'device': '空调'}, {'mode': '节能模式'}]},\n",
       "   {'action': 'acmode_form'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'address': '主卧'}, {'device': '空调'}]},\n",
       "   {'action': 'acmode_form'}]},\n",
       " {'story': '空调模式控制/打开/调成xx模式/关闭xx模式',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '空调'}, {'address': '书房'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'Control-AC_Mode', 'entities': [{'mode': '节能模式'}]},\n",
       "   {'action': 'acmode_form'},\n",
       "   {'intent': 'Control-AC_Mode', 'entities': [{'mode': '左右扫风'}]},\n",
       "   {'action': 'acmode_form'}]},\n",
       " {'story': '控制空调定时操作，所有信息齐全/无需澄清槽位信息/直接执行',\n",
       "  'steps': [{'intent': 'Control-AC_Timing',\n",
       "    'entities': [{'time': '一小时'},\n",
       "     {'operation': '关闭'},\n",
       "     {'device': '空调'},\n",
       "     {'address': '主卧'}]},\n",
       "   {'action': 'actiming_form'}]},\n",
       " {'story': '控制空调定时操作 定时关闭空调(具体空调设备信息未指明(需要明确主卧/客厅/书房) 其他信息齐全)/澄清具体设备/用户回复具体 [空调] /继续执行',\n",
       "  'steps': [{'intent': 'Control-AC_Timing',\n",
       "    'entities': [{'time': '一小时'}, {'operation': '关闭'}, {'device': '空调'}]},\n",
       "   {'action': 'actiming_form'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'device': '空调'}, {'address': '主卧'}]},\n",
       "   {'action': 'actiming_form'}]},\n",
       " {'story': '控制空调定时操作 定时关闭空调(空调信息未指明 其他信息齐全)/澄清具体设备/用户回复 [房间] /继续执行',\n",
       "  'steps': [{'intent': 'Control-AC_Timing',\n",
       "    'entities': [{'time': '一小时'}, {'operation': '关闭'}, {'device': '空调'}]},\n",
       "   {'action': 'actiming_form'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'actiming_form'}]},\n",
       " {'story': '控制空调定时操作(定时时间，定时操作，目标设备都不明确)/澄清设备/澄清操作/澄清时间',\n",
       "  'steps': [{'intent': 'Control-AC_Timing'},\n",
       "   {'action': 'actiming_form'},\n",
       "   {'intent': 'Control-AC_Timing',\n",
       "    'entities': [{'time': '一小时'}, {'operation': '关闭'}, {'device': '空调'}]},\n",
       "   {'action': 'actiming_form'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'device': '空调'}, {'address': '主卧'}]},\n",
       "   {'action': 'actiming_form'}]},\n",
       " {'story': '空调定时操作,询问具体设备,回复房间名称',\n",
       "  'steps': [{'intent': 'Control-AC_Timing',\n",
       "    'entities': [{'time': '五小时'}, {'operation': '关闭'}, {'device': '空调'}]},\n",
       "   {'action': 'actiming_form'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'actiming_form'}]},\n",
       " {'story': '打开空调(哪个空调设备)/主卧的(正在为您打开主卧空调)/定时一小时后关闭(已为您将主卧空调设置一小时后关闭)',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '空调'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'Control-AC_Timing',\n",
       "    'entities': [{'time': '一小时'}, {'operation': '关闭'}]},\n",
       "   {'action': 'actiming_form'}]},\n",
       " {'story': '调整空调的风速(所有信息齐全，具体的空调设备，风速调高或者是调低)/执行',\n",
       "  'steps': [{'intent': 'Control-AC_Wind',\n",
       "    'entities': [{'operation': '增大'},\n",
       "     {'target': '风速'},\n",
       "     {'device': '空调'},\n",
       "     {'address': '客厅'}]},\n",
       "   {'action': 'action_controlDeviceWind'}]},\n",
       " {'story': '调整空调的风速(所有信息齐全，具体的空调设备，风速具体参数值(最大风速/最小风速/中等风速))/执行',\n",
       "  'steps': [{'intent': 'Control-AC_Wind',\n",
       "    'entities': [{'sensorvalue': '最大'},\n",
       "     {'target': '风速'},\n",
       "     {'device': '客厅'},\n",
       "     {'address': '客厅'}]},\n",
       "   {'action': 'action_controlDeviceWind'}]},\n",
       " {'story': '调整空调的风速(无指明具体空调设备)/确认 房间 /执行',\n",
       "  'steps': [{'intent': 'Control-AC_Wind',\n",
       "    'entities': [{'operation': '调高'}, {'target': '风速'}, {'device': '空调'}]},\n",
       "   {'action': 'action_controlDeviceWind'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'action_controlDeviceWind'}]},\n",
       " {'story': '调整空调的风速(无指明具体空调设备)/确认 房间 /执行',\n",
       "  'steps': [{'intent': 'Control-AC_Wind',\n",
       "    'entities': [{'operation': '调高'}, {'device': '空调'}, {'target': '风速'}]},\n",
       "   {'action': 'action_controlDeviceWind'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'action_controlDeviceWind'}]},\n",
       " {'story': '调整主卧空调的风速(有具体设备无操作信息)/确认 操作 /执行',\n",
       "  'steps': [{'intent': 'Control-AC_Wind',\n",
       "    'entities': [{'operation': '调高'},\n",
       "     {'device': '空调'},\n",
       "     {'address': '主卧'},\n",
       "     {'target': '风速'}]},\n",
       "   {'action': 'action_controlDeviceWind'}]},\n",
       " {'story': '调整空调的风速(无指明具体空调设备)/确认 设备 /执行',\n",
       "  'steps': [{'intent': 'Control-AC_Wind',\n",
       "    'entities': [{'operation': '调高'}, {'device': '空调'}, {'target': '风速'}]},\n",
       "   {'action': 'action_controlDeviceWind'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'device': '空调'}, {'address': '主卧'}]},\n",
       "   {'action': 'action_controlDeviceWind'}]},\n",
       " {'story': 'interactive_story_1 调整空调风速/打开/调到最大/调到最小/询问设备/确认设备/执行',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '空调'}, {'address': '主卧'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'Control-AC_Wind',\n",
       "    'entities': [{'sensorvalue': '最大'}, {'target': '风速'}]},\n",
       "   {'action': 'action_controlDeviceWind'},\n",
       "   {'intent': 'Control-AC_Wind',\n",
       "    'entities': [{'sensorvalue': '最小'}, {'target': '风速'}]},\n",
       "   {'action': 'action_controlDeviceWind'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'device': '空调'}, {'address': '主卧'}]},\n",
       "   {'action': 'action_controlDeviceWind'}]},\n",
       " {'story': 'interactive_story_1 打开书房空调/书房空调风速调高',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '空调'}, {'address': '书房'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'Control-AC_Wind',\n",
       "    'entities': [{'device': '空调'},\n",
       "     {'address': '书房'},\n",
       "     {'operation': '增大'},\n",
       "     {'target': '风速'}]},\n",
       "   {'action': 'action_controlDeviceWind'}]},\n",
       " {'story': '空调温度控制  所有信息齐全 xx空调 温度 调高到 X度',\n",
       "  'steps': [{'intent': 'Control-AC_Temp',\n",
       "    'entities': [{'device': '空调'},\n",
       "     {'address': '主卧'},\n",
       "     {'operation': '调高到'},\n",
       "     {'temperature': '二十度'}]},\n",
       "   {'action': 'action_controlactemp'}]},\n",
       " {'story': '空调温度控制  所有信息齐全 xx空调 温度 调高 X度',\n",
       "  'steps': [{'intent': 'Control-AC_Temp',\n",
       "    'entities': [{'address': '客厅'},\n",
       "     {'device': '空调'},\n",
       "     {'operation': '调高'},\n",
       "     {'temperature': '一度'}]},\n",
       "   {'action': 'action_controlactemp'}]},\n",
       " {'story': 'interactive_story_1 空调温度控制-打开/温度调节(调高到 X度) 设备信息齐全 无需澄清/温度调节(调高 X度)/关闭',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'device': '空调'}, {'address': '主卧'}, {'operation': '打开'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'Control-AC_Temp',\n",
       "    'entities': [{'device': '空调'},\n",
       "     {'operation': '调高到'},\n",
       "     {'temperature': '二十五度'}]},\n",
       "   {'action': 'action_controlactemp'},\n",
       "   {'intent': 'Control-AC_Temp',\n",
       "    'entities': [{'device': '空调'},\n",
       "     {'operation': '调高'},\n",
       "     {'temperature': '两度'}]},\n",
       "   {'action': 'action_controlactemp'},\n",
       "   {'intent': 'Control-AC_Close',\n",
       "    'entities': [{'operation': '关闭'}, {'device': '空调'}]},\n",
       "   {'action': 'action_close_ac'}]},\n",
       " {'story': '空调温度控制/温度调节(调高到 X度)device信息不全，需要进行澄清(澄清的情况为 设备)/根据填充的槽位信息进行执行',\n",
       "  'steps': [{'intent': 'Control-AC_Temp',\n",
       "    'entities': [{'device': '空调'},\n",
       "     {'operation': '调高到'},\n",
       "     {'temperature': '二十五度'}]},\n",
       "   {'action': 'action_controlactemp'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'device': '空调'}, {'address': '主卧'}]},\n",
       "   {'action': 'action_controlactemp'}]},\n",
       " {'story': '空调温度控制/温度调节(调高到 X度)device信息不全，需要进行澄清(澄清的情况为 房间)/温度调节(调高 X度)',\n",
       "  'steps': [{'intent': 'Control-AC_Temp',\n",
       "    'entities': [{'device': '空调'},\n",
       "     {'operation': '调高到'},\n",
       "     {'temperature': '二十五度'}]},\n",
       "   {'action': 'action_controlactemp'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'action_controlactemp'}]},\n",
       " {'story': '打开空调/主卧空调/把温度(调高未识别到)/AC_temp',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '空调'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'Control-AC_Temp',\n",
       "    'entities': [{'temperature': '二十五度'}, {'target': '温度'}]},\n",
       "   {'action': 'action_controlactemp'}]},\n",
       " {'story': '打开空调/主卧空调/把温度(调高识别到)/AC_temp',\n",
       "  'steps': [{'intent': 'Control-AC_Open',\n",
       "    'entities': [{'operation': '打开'}, {'device': '空调'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'inform_ac', 'entities': [{'address': '客厅'}]},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'intent': 'Control-AC_Temp',\n",
       "    'entities': [{'target': '温度'}, {'operation': '调高'}]},\n",
       "   {'action': 'action_controlactemp'}]},\n",
       " {'story': '空调温度调高点/询问具体空调/回复主卧',\n",
       "  'steps': [{'intent': 'Control-AC_Temp',\n",
       "    'entities': [{'device': '空调'}, {'target': '温度'}, {'operation': '调高'}]},\n",
       "   {'action': 'action_controlactemp'},\n",
       "   {'intent': 'inform_room', 'entities': [{'address': '主卧'}]},\n",
       "   {'action': 'action_controlactemp'}]},\n",
       " {'story': '隐式表达想要打开空调设备/询问是否打开/确认/打开空调/制热/制冷模式',\n",
       "  'steps': [{'intent': 'latent_control_temp'},\n",
       "   {'action': 'action_latent_control_temp'},\n",
       "   {'intent': 'affirm'},\n",
       "   {'action': 'action_affirm_opensetaircondition'}]},\n",
       " {'story': '隐式表达想要打开空调设备/询问是否打开/拒绝/槽位清空',\n",
       "  'steps': [{'intent': 'latent_control_temp'},\n",
       "   {'action': 'action_latent_control_temp'},\n",
       "   {'intent': 'deny'},\n",
       "   {'action': 'action_deny_opensetaircondition'}]}]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "story_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "with open('./all_stories.yml', mode='w', encoding='utf-8') as f:\n",
    "    f.write(yaml.dump(story_data,allow_unicode=True))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "with open('./all_stories.yml', 'r', encoding='utf-8') as f:\n",
    "    dataset = yaml.load(f.read(),Loader=yaml.Loader)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'steps': [{'intent': 'greet'}, {'action': 'utter_answer_greet'}],\n",
       "  'story': 'greet'},\n",
       " {'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'affirm'},\n",
       "   {'action': 'utter_answer_affirm'}],\n",
       "  'story': 'say affirm  with greet'},\n",
       " {'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'deny'},\n",
       "   {'action': 'utter_answer_deny'}],\n",
       "  'story': 'say no with greet'},\n",
       " {'steps': [{'intent': 'deny'}, {'action': 'utter_answer_deny'}],\n",
       "  'story': 'say no'},\n",
       " {'steps': [{'intent': 'goodbye'}, {'action': 'utter_answer_goodbye'}],\n",
       "  'story': 'say goodbye'},\n",
       " {'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'thanks'},\n",
       "   {'action': 'utter_answer_thanks'}],\n",
       "  'story': 'thanks with greet'},\n",
       " {'steps': [{'intent': 'thanks'}, {'action': 'utter_answer_thanks'}],\n",
       "  'story': 'thanks'},\n",
       " {'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'whoareyou'},\n",
       "   {'action': 'utter_answer_whoareyou'}],\n",
       "  'story': 'who are you with greet'},\n",
       " {'steps': [{'intent': 'whoareyou'}, {'action': 'utter_answer_whoareyou'}],\n",
       "  'story': 'who are you'},\n",
       " {'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'whoareyou'},\n",
       "   {'action': 'utter_answer_whoareyou'}],\n",
       "  'story': 'who are you with greet'},\n",
       " {'steps': [{'intent': 'whattodo'}, {'action': 'utter_answer_whattodo'}],\n",
       "  'story': 'what to do'},\n",
       " {'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'whattodo'},\n",
       "   {'action': 'utter_answer_whattodo'}],\n",
       "  'story': 'what to do with greet'},\n",
       " {'steps': [{'intent': 'chitchat'}, {'action': 'utter_chitchat'}],\n",
       "  'story': 'chitchat'},\n",
       " {'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'entities': [{'date_time': '今天'}], 'intent': 'request_datetime'},\n",
       "   {'action': 'action_answer_requestdatetime'}],\n",
       "  'story': '询问日期'},\n",
       " {'steps': [{'entities': [{'date_time': '今天'}], 'intent': 'request_datetime'},\n",
       "   {'action': 'action_answer_requestdatetime'},\n",
       "   {'entities': [{'date_time': '明天'}], 'intent': 'request_datetime'},\n",
       "   {'action': 'action_answer_requestdatetime'},\n",
       "   {'entities': [{'date_time': '后天'}], 'intent': 'request_datetime'},\n",
       "   {'action': 'action_answer_requestdatetime'}],\n",
       "  'story': '询问日期，连续询问'},\n",
       " {'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'entities': [{'date_time': '今天'}], 'intent': 'request_weekday'},\n",
       "   {'action': 'action_answer_requestweekday'}],\n",
       "  'story': '询问周几'},\n",
       " {'steps': [{'entities': [{'date_time': '今天'}], 'intent': 'request_weekday'},\n",
       "   {'action': 'action_answer_requestweekday'},\n",
       "   {'entities': [{'date_time': '明天'}], 'intent': 'request_datetime'},\n",
       "   {'action': 'action_answer_requestweekday'},\n",
       "   {'entities': [{'date_time': '后天'}], 'intent': 'request_datetime'},\n",
       "   {'action': 'action_answer_requestweekday'}],\n",
       "  'story': '询问周几，连续询问'},\n",
       " {'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'request_time'},\n",
       "   {'action': 'action_answer_time'}],\n",
       "  'story': '询问时间'},\n",
       " {'steps': [{'intent': 'greet'},\n",
       "   {'action': 'utter_answer_greet'},\n",
       "   {'intent': 'request_weather'},\n",
       "   {'action': 'utter_answer_requestweather'}],\n",
       "  'story': '询问天气'},\n",
       " {'steps': [{'intent': 'request_weather'},\n",
       "   {'action': 'utter_answer_requestweather'}],\n",
       "  'story': '询问天气2'},\n",
       " {'steps': [{'entities': [{'date_time': '今天'}], 'intent': 'request_weather'},\n",
       "   {'slot_was_set': [{'date_time': '今天'}]},\n",
       "   {'action': 'utter_answer_requestweather'}],\n",
       "  'story': '询问天气3'},\n",
       " {'steps': [{'entities': [{'operation': '打开'}, {'device': '抽油烟机'}],\n",
       "    'intent': 'Control-RangHood_State'},\n",
       "   {'action': 'action_rangehood'}],\n",
       "  'story': '抽油烟机的开关状态控制自定义对话模板 打开/关闭 抽油烟机'},\n",
       " {'steps': [{'entities': [{'operation': '打开'},\n",
       "     {'device': '抽油烟机'},\n",
       "     {'mode': '强力模式'}],\n",
       "    'intent': 'Control-RangHood_State'},\n",
       "   {'action': 'action_rangehood'}],\n",
       "  'story': '抽油烟机的开关状态控制自定义对话模板 打开/关闭 抽油烟机 强力模式'},\n",
       " {'steps': [{'entities': [{'device': '主卧灯'},\n",
       "     {'address': '主卧'},\n",
       "     {'operation': '打开'}],\n",
       "    'intent': 'Control-Lamp_Open'},\n",
       "   {'action': 'action_open_lamp'}],\n",
       "  'story': 'open lamp--具体灯具设备指明'},\n",
       " {'steps': [{'entities': [{'device': '灯'}, {'operation': '打开'}],\n",
       "    'intent': 'Control-Lamp_Open'},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'entities': [{'device': '灯'}, {'address': '客厅'}], 'intent': 'inform_lamp'},\n",
       "   {'action': 'action_open_lamp'}],\n",
       "  'story': 'open Lamp2--未指明具体灯具设备/询问具体设备/确认灯具/执行'},\n",
       " {'steps': [{'entities': [{'device': '灯'}, {'operation': '打开'}],\n",
       "    'intent': 'Control-Lamp_Open'},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'entities': [{'address': '客厅'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_open_lamp'}],\n",
       "  'story': 'open Lamp2--未指明具体灯具设备/询问具体设备/确认房间/执行'},\n",
       " {'steps': [{'entities': [{'device': '灯'}, {'operation': '打开'}],\n",
       "    'intent': 'Control-Lamp_Open'},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'entities': [{'range': '所有'}], 'intent': 'inform_range'},\n",
       "   {'action': 'action_open_lamp'}],\n",
       "  'story': 'open Lamp2--未指明具体灯具设备/询问具体设备/确认所有灯具/执行'},\n",
       " {'steps': [{'entities': [{'range': '所有'},\n",
       "     {'device': '灯'},\n",
       "     {'operation': '打开'}],\n",
       "    'intent': 'Control-Lamp_Open'},\n",
       "   {'action': 'action_open_lamp'}],\n",
       "  'story': 'open Lamp3--指明所有的灯'},\n",
       " {'steps': [{'entities': [{'operation': '开'}, {'device': '灯'}],\n",
       "    'intent': 'Control-Lamp_Open'},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'entities': [{'device': '灯'}, {'address': '客厅'}], 'intent': 'inform_lamp'},\n",
       "   {'action': 'action_open_lamp'}],\n",
       "  'story': '硬编码回复灯具打开--澄清具体设备/用户确认设备/执行'},\n",
       " {'steps': [{'entities': [{'operation': '开'}, {'device': '灯'}],\n",
       "    'intent': 'Control-Lamp_Open'},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'entities': [{'address': '客厅'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_open_lamp'}],\n",
       "  'story': '硬编码回复灯具打开--澄清具体设备/用户确认房间/执行'},\n",
       " {'steps': [{'entities': [{'device': '灯'},\n",
       "     {'address': '餐厅'},\n",
       "     {'operation': '关闭'}],\n",
       "    'intent': 'Control-Lamp_Close'},\n",
       "   {'action': 'action_close_lamp'}],\n",
       "  'story': 'close Lamp1--具体指明灯具设备'},\n",
       " {'steps': [{'entities': [{'device': '灯'}, {'operation': '关闭'}],\n",
       "    'intent': 'Control-Lamp_Close'},\n",
       "   {'action': 'action_close_lamp'},\n",
       "   {'entities': [{'device': '灯'}, {'address': '餐厅'}], 'intent': 'inform_lamp'},\n",
       "   {'action': 'action_close_lamp'}],\n",
       "  'story': 'close Lamp2--未指明灯具设备，需要进一步澄清'},\n",
       " {'steps': [{'entities': [{'device': '灯'}, {'operation': '关闭'}],\n",
       "    'intent': 'Control-Lamp_Close'},\n",
       "   {'action': 'action_close_lamp'},\n",
       "   {'entities': [{'range': '所有'}], 'intent': 'inform_range'},\n",
       "   {'action': 'action_close_lamp'}],\n",
       "  'story': 'close Lamp2--未指明灯具设备，澄清全部的灯'},\n",
       " {'steps': [{'entities': [{'device': '灯'},\n",
       "     {'range': '所有'},\n",
       "     {'operation': '关闭'}],\n",
       "    'intent': 'Control-Lamp_Close'},\n",
       "   {'action': 'action_close_lamp'}],\n",
       "  'story': 'close Lamp3--指明所有的灯具设备'},\n",
       " {'steps': [{'entities': [{'operation': '关'}, {'device': '灯'}],\n",
       "    'intent': 'Control-Lamp_Close'},\n",
       "   {'action': 'action_close_lamp'},\n",
       "   {'entities': [{'device': '灯'}, {'address': '餐厅'}], 'intent': 'inform_lamp'},\n",
       "   {'action': 'action_close_lamp'}],\n",
       "  'story': '硬编码回复控制灯具关闭'},\n",
       " {'steps': [{'entities': [{'operation': '关'}, {'device': '灯'}],\n",
       "    'intent': 'Control-Lamp_Close'},\n",
       "   {'action': 'action_close_lamp'},\n",
       "   {'entities': [{'range': '所有'}], 'intent': 'inform_range'},\n",
       "   {'action': 'action_close_lamp'}],\n",
       "  'story': '硬编码回复控制灯具关闭 回复全部的情况'},\n",
       " {'steps': [{'entities': [{'operation': '调高'}, {'device': '灯'}],\n",
       "    'intent': 'Control-Lamp_Lightness'},\n",
       "   {'action': 'action_controllamplightness'},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_controllamplightness'}],\n",
       "  'story': '调整灯的亮度(无指明具体灯光设备)/确认房间/执行'},\n",
       " {'steps': [{'entities': [{'operation': '调低'}, {'device': '灯'}],\n",
       "    'intent': 'Control-Lamp_Lightness'},\n",
       "   {'action': 'action_controllamplightness'},\n",
       "   {'entities': [{'address': '客厅'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_controllamplightness'}],\n",
       "  'story': '调低灯的亮度(无指明具体灯光设备)/确认房间/执行'},\n",
       " {'steps': [{'entities': [{'operation': '调低'}, {'device': '灯光'}],\n",
       "    'intent': 'Control-Lamp_Lightness'},\n",
       "   {'action': 'action_controllamplightness'},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_controllamplightness'}],\n",
       "  'story': '调低灯的亮度(澄清具体灯具设备)/确认设备/执行'},\n",
       " {'steps': [{'entities': [{'operation': '调高'},\n",
       "     {'device': '灯'},\n",
       "     {'address': '客厅'}],\n",
       "    'intent': 'Control-Lamp_Lightness'},\n",
       "   {'action': 'action_controllamplightness'}],\n",
       "  'story': '调整灯的亮度(指明具体房间灯光设备)/执行'},\n",
       " {'steps': [{'entities': [{'sensorvalue': '最大亮度'},\n",
       "     {'device': '灯'},\n",
       "     {'address': '客厅'}],\n",
       "    'intent': 'Control-Lamp_Lightness'},\n",
       "   {'action': 'action_controllamplightness'}],\n",
       "  'story': '调整灯的亮度(指明具体房间灯光设备 最大亮度&中等亮度&最小亮度)/执行'},\n",
       " {'steps': [{'entities': [{'operation': '打开'},\n",
       "     {'device': '灯'},\n",
       "     {'address': '主卧'}],\n",
       "    'intent': 'Control-Lamp_Open'},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'entities': [{'sensorvalue': '最大亮度'}], 'intent': 'Control-Lamp_Lightness'},\n",
       "   {'action': 'action_controllamplightness'},\n",
       "   {'entities': [{'sensorvalue': '最低亮度'}], 'intent': 'Control-Lamp_Lightness'},\n",
       "   {'action': 'action_controllamplightness'}],\n",
       "  'story': 'interactive_story_1 调整灯光亮度/打开/调到最亮/调到最暗/询问设备/确认设备/执行'},\n",
       " {'steps': [{'entities': [{'operation': '打开'}, {'device': '台灯'}],\n",
       "    'intent': 'Control-Lamp_Open'},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'entities': [{'device': '台灯'}, {'operation': '调亮'}],\n",
       "    'intent': 'Control-Lamp_Lightness'},\n",
       "   {'action': 'action_controllamplightness'}],\n",
       "  'story': 'interactive_story_1 打开台灯/台灯调亮'},\n",
       " {'steps': [{'entities': [{'operation': '打开'},\n",
       "     {'device': '灯'},\n",
       "     {'address': '厕所'}],\n",
       "    'intent': 'Control-Lamp_Open'},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'entities': [{'sensorvalue': '最低亮度'}], 'intent': 'inform_sensorvalue'},\n",
       "   {'action': 'action_controllamplightness'}],\n",
       "  'story': '打开XX灯/最低亮度'},\n",
       " {'steps': [{'entities': [{'operation': '打开'},\n",
       "     {'device': '灯'},\n",
       "     {'address': '主卧'}],\n",
       "    'intent': 'Control-Lamp_Open'},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'entities': [{'sensorvalue': '最大亮度'}], 'intent': 'inform_sensorvalue'},\n",
       "   {'action': 'action_controllamplightness'}],\n",
       "  'story': '打开XX灯/最大亮度(intent识别为inform sensorvalue情况)'},\n",
       " {'steps': [{'entities': [{'operation': '打开'},\n",
       "     {'device': '灯'},\n",
       "     {'address': '厨房'}],\n",
       "    'intent': 'Control-Lamp_Open'},\n",
       "   {'action': 'action_open_lamp'},\n",
       "   {'entities': [{'sensorvalue': '最大亮度'}], 'intent': 'Control-Lamp_Lightness'},\n",
       "   {'action': 'action_controllamplightness'}],\n",
       "  'story': '打开厨房灯/最大亮度(intent识别为Control-Lamp_Lightness情况)/正常回复'},\n",
       " {'steps': [{'entities': [{'device': '灯'},\n",
       "     {'address': '客厅'},\n",
       "     {'mode': '明亮模式'}],\n",
       "    'intent': 'Control-Lamp_Mode'},\n",
       "   {'action': 'lampmode_form'}],\n",
       "  'story': '控制灯光模式(槽位信息齐全)/直接执行Action'},\n",
       " {'steps': [{'entities': [{'device': '灯'}, {'color': '冷色'}, {'address': '客厅'}],\n",
       "    'intent': 'Control-Lamp_Color'},\n",
       "   {'action': 'lampcolor_form'}],\n",
       "  'story': '控制灯光颜色(槽位信息齐全)/直接执行Action'},\n",
       " {'steps': [{'entities': [{'device': '灯'},\n",
       "     {'mode': '温馨模式'},\n",
       "     {'address': '客厅'}],\n",
       "    'intent': 'Control-Lamp_Mode'},\n",
       "   {'action': 'lampmode_form'}],\n",
       "  'story': '控制灯光的模式(灯具信息齐全 目标模式信息不全，需要澄清目标信息)/询问需要调整成什么模式/确认执行'},\n",
       " {'steps': [{'entities': [{'device': '灯'}, {'address': '客厅'}, {'color': '红色'}],\n",
       "    'intent': 'Control-Lamp_Color'},\n",
       "   {'action': 'lampcolor_form'}],\n",
       "  'story': '控制灯光的颜色(灯具信息齐全 目标模式信息不全，需要澄清目标信息)/询问需要调整成什么模式/确认执行'},\n",
       " {'steps': [{'entities': [{'device': '灯'},\n",
       "     {'address': '客厅'},\n",
       "     {'mode': '明亮模式'}],\n",
       "    'intent': 'Control-Lamp_Mode'},\n",
       "   {'action': 'lampmode_form'}],\n",
       "  'story': '控制灯光的模式(灯具信息不齐全 目标模式信息不全，需要逐个澄清)/询问房间(具体灯具)/询问需要调整成什么模式/确认执行'},\n",
       " {'steps': [{'entities': [{'device': '灯'}, {'address': '客厅'}, {'color': '暖色'}],\n",
       "    'intent': 'Control-Lamp_Color'},\n",
       "   {'action': 'lampcolor_form'}],\n",
       "  'story': '控制灯光的颜色(灯具信息不齐全 目标模式信息不全，需要逐个澄清)/询问房间(具体灯具)/询问需要调整成什么模式/确认执行'},\n",
       " {'steps': [{'entities': [{'device': '灯'}], 'intent': 'Control-Lamp_Mode'},\n",
       "   {'action': 'lampmode_form', 'entities': [{'mode': '明亮模式'}]},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'lampmode_form'}],\n",
       "  'story': '控制灯光的模式(灯具信息缺少指定房间信息)'},\n",
       " {'steps': [{'entities': [{'device': '灯'}], 'intent': 'Control-Lamp_Color'},\n",
       "   {'action': 'lampcolor_form', 'entities': [{'color': '暖色'}]},\n",
       "   {'entities': [{'address': '客卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'lampcolor_form'}],\n",
       "  'story': '控制灯光的颜色(灯具信息缺少指定房间信息)'},\n",
       " {'steps': [{'entities': [{'device': '灯'},\n",
       "     {'address': '客厅'},\n",
       "     {'target': '颜色'},\n",
       "     {'operation': '调整'},\n",
       "     {'color': '红色'}],\n",
       "    'intent': 'Control-Lamp_Color'},\n",
       "   {'action': 'lampcolor_form'},\n",
       "   {'entities': [{'operation': '切换'}, {'target': '色调'}, {'color': '暖色'}],\n",
       "    'intent': 'Control-Lamp_Color'},\n",
       "   {'action': 'lampcolor_form'}],\n",
       "  'story': '控制灯光的颜色 (切换色调，询问色调)'},\n",
       " {'steps': [{'entities': [{'time': '一小时'},\n",
       "     {'operation': '打开'},\n",
       "     {'device': '灯'},\n",
       "     {'address': '主卧'}],\n",
       "    'intent': 'Control-Lamp_Timing'},\n",
       "   {'action': 'lamptiming_form'}],\n",
       "  'story': '控制灯光定时操作，所有信息齐全/无需澄清槽位信息/直接执行'},\n",
       " {'steps': [{'entities': [{'operation': '关闭'},\n",
       "     {'device': '灯'},\n",
       "     {'address': '客厅'},\n",
       "     {'time': '两小时'}],\n",
       "    'intent': 'Control-Lamp_Timing'},\n",
       "   {'action': 'lamptiming_form'}],\n",
       "  'story': '控制灯光定时操作 定时关闭客厅灯(灯具指明)/澄清定时时间'},\n",
       " {'steps': [{'entities': [{'time': '一小时'},\n",
       "     {'operation': '关闭'},\n",
       "     {'device': '灯'}],\n",
       "    'intent': 'Control-Lamp_Timing'},\n",
       "   {'action': 'lamptiming_form'},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'lamptiming_form'}],\n",
       "  'story': '控制灯光定时操作 定时关闭灯(灯具信息未指明 其他信息齐全)/澄清具体设备/用户回复具体 [灯具] /继续执行'},\n",
       " {'steps': [{'intent': 'latent_control_lamplight'},\n",
       "   {'action': 'action_latent_control_lamplight'},\n",
       "   {'intent': 'inform_lamp'},\n",
       "   {'action': 'action_latent_control_lamplight'},\n",
       "   {'intent': 'affirm'},\n",
       "   {'action': 'action_affirm_controllamplight'}],\n",
       "  'story': '隐式表达想要调整灯光亮度/询问具体灯具/询问是否调整/确认/亮度调整'},\n",
       " {'steps': [{'intent': 'latent_control_lamplight'},\n",
       "   {'action': 'action_latent_control_lamplight'},\n",
       "   {'intent': 'inform_lamp'},\n",
       "   {'action': 'action_latent_control_lamplight'},\n",
       "   {'intent': 'deny'},\n",
       "   {'action': 'action_deny_controllamplight'}],\n",
       "  'story': '隐式表达想要调整灯光亮度/询问具体灯具/询问是否调整/拒绝/槽位清空'},\n",
       " {'steps': [{'intent': 'latent_control_lamplight'},\n",
       "   {'action': 'action_latent_control_lamplight'},\n",
       "   {'intent': 'affirm'},\n",
       "   {'action': 'action_affirm_controllamplight'}],\n",
       "  'story': '隐式表达想要调整灯光亮度/询问是否调整/确认/亮度调整'},\n",
       " {'steps': [{'intent': 'latent_control_lamplight'},\n",
       "   {'action': 'action_latent_control_lamplight'},\n",
       "   {'intent': 'deny'},\n",
       "   {'action': 'action_deny_controllamplight'}],\n",
       "  'story': '隐式表达想要调整灯光亮度/询问是否调整/拒绝/槽位清空'},\n",
       " {'steps': [{'entities': [{'device': '风扇'}, {'operation': '打开'}],\n",
       "    'intent': 'Control-Fan_State'},\n",
       "   {'action': 'action_fan_state'}],\n",
       "  'story': 'open or close 风扇--无具体需要指明的设备名称，单独的'},\n",
       " {'steps': [{'entities': [{'device': '风扇'}, {'operation': '关闭'}],\n",
       "    'intent': 'Control-Fan_State'},\n",
       "   {'action': 'action_fan_state'}],\n",
       "  'story': 'open or close 风扇--无具体需要指明的设备名称，单独的'},\n",
       " {'steps': [{'entities': [{'operation': '增大风速'}, {'device': '风扇'}],\n",
       "    'intent': 'Control-Fan_Wind'},\n",
       "   {'action': 'action_controlDeviceWind'}],\n",
       "  'story': '调整风扇的风速(所有信息齐全，具体的风扇设备，风速调高或者是调低)/执行'},\n",
       " {'steps': [{'entities': [{'sensorvalue': '最大风速'}, {'device': '风扇'}],\n",
       "    'intent': 'Control-Fan_Wind'},\n",
       "   {'action': 'action_controlDeviceWind'}],\n",
       "  'story': '调整风扇的风速(所有信息齐全，具体的风扇设备，风速具体参数值(最大风速/最小风速/中等风速))/执行'},\n",
       " {'steps': [{'entities': [{'sensorvalue': '中等风速'}, {'device': '风扇'}],\n",
       "    'intent': 'Control-Fan_Wind'},\n",
       "   {'action': 'action_controlDeviceWind'}],\n",
       "  'story': '调整风扇的风速(所有信息齐全，具体的风扇设备，风速具体参数值(最大风速/最小风速/中等风速))/执行'},\n",
       " {'steps': [{'entities': [{'sensorvalue': '三档'}, {'device': '风扇'}],\n",
       "    'intent': 'Control-Fan_Gear'},\n",
       "   {'action': 'action_fan_gear'}],\n",
       "  'story': '调整风扇的档位级别(所有信息齐全，具体的风扇设备，档位具体参数值(三档/二挡/一档))/执行'},\n",
       " {'steps': [{'entities': [{'operation': '调高'}, {'device': '风扇'}],\n",
       "    'intent': 'Control-Fan_Gear'},\n",
       "   {'action': 'action_fan_gear'}],\n",
       "  'story': '调整风扇的档位级别(所有信息齐全，具体的风扇设备，档位调高调低)/执行'},\n",
       " {'steps': [{'entities': [{'mode': '左右扫风'}, {'device': '风扇'}],\n",
       "    'intent': 'Control-Fan_Mode'},\n",
       "   {'action': 'action_fan_mode'}],\n",
       "  'story': '调整风扇的模式(所有信息齐全，具体的风扇设备，具体模式) 风扇调整至XX模式 /执行'},\n",
       " {'steps': [{'entities': [{'mode': '左右扫风'},\n",
       "     {'device': '风扇'},\n",
       "     {'operation': '关闭'}],\n",
       "    'intent': 'Control-Fan_Mode'},\n",
       "   {'action': 'action_fan_mode'}],\n",
       "  'story': '调整风扇的模式(所有信息齐全，具体的风扇设备，具体模式) 风扇XX模式关闭 关闭XX模式 /执行'},\n",
       " {'steps': [{'entities': [{'time': '一小时'},\n",
       "     {'operation': '关闭'},\n",
       "     {'device': '风扇'}],\n",
       "    'intent': 'Control-Fan_Timing'},\n",
       "   {'action': 'fantiming_form'}],\n",
       "  'story': '控制风扇定时操作，所有信息齐全/无需澄清槽位信息/直接执行'},\n",
       " {'steps': [{'entities': [{'operation': '打开'}, {'device': '风扇'}],\n",
       "    'intent': 'Control-Fan_State'},\n",
       "   {'action': 'action_fan_state'},\n",
       "   {'entities': [{'time': '一小时'}], 'intent': 'Control-Fan_Timing'},\n",
       "   {'action': 'fantiming_form'}],\n",
       "  'story': '打开风扇/定时一小时(已有槽位operation打开)/执行定时一小时后打开风扇'},\n",
       " {'steps': [{'entities': [{'operation': '打开'}, {'device': '风扇'}],\n",
       "    'intent': 'Control-Fan_State'},\n",
       "   {'action': 'action_fan_state'},\n",
       "   {'entities': [{'time': '一小时'}], 'intent': 'Control-Fan_Timing'},\n",
       "   {'action': 'fantiming_form'}],\n",
       "  'story': '打开风扇/定时一个小时(没有operation槽位信息 需要澄清)/请问执行什么操作/关闭/已为您设置风扇一小时后关闭'},\n",
       " {'steps': [{'entities': [{'operation': '打开'}, {'device': '加湿器'}],\n",
       "    'intent': 'Control-Humidifier_State'},\n",
       "   {'action': 'action_humidifierstate'}],\n",
       "  'story': '加湿器的开关状态控制自定义对话模板 打开/关闭 加湿器'},\n",
       " {'steps': [{'entities': [{'gear_level': '三档'}, {'device': '加湿器'}],\n",
       "    'intent': 'Control-Humidifier_Gear'},\n",
       "   {'action': 'action_humidifiergear'}],\n",
       "  'story': '调整加湿器的档位级别(所有信息齐全，具体的加湿器设备，档位具体参数值(三档/二挡/一档))/执行'},\n",
       " {'steps': [{'entities': [{'operation': '调高'}, {'device': '加湿器'}],\n",
       "    'intent': 'Control-Humidifier_Gear'},\n",
       "   {'action': 'action_humidifiergear'}],\n",
       "  'story': '调整加湿器的档位级别(所有信息齐全 ，具体的加湿器设备，档位调高调低)/执行'},\n",
       " {'steps': [{'entities': [{'device': '加湿器'},\n",
       "     {'time': '一个小时'},\n",
       "     {'operation': '关闭'}],\n",
       "    'intent': 'Control-Humidifier_Timing'},\n",
       "   {'action': 'action_humidifiertiming'}],\n",
       "  'story': '加湿器的定时控制自定义对话模板 定时X小时关闭'},\n",
       " {'steps': [{'intent': 'Request-Humidifier_Humidity'},\n",
       "   {'action': 'action_requesthumidity'}],\n",
       "  'story': '针对加湿器查询当前室内湿度值'},\n",
       " {'steps': [{'entities': [{'operation': '打开'}, {'device': '电饭煲'}],\n",
       "    'intent': 'Control-RiceCooker_State'},\n",
       "   {'action': 'action_RiceCookerstate'}],\n",
       "  'story': '电饭煲的开关状态控制自定义对话模板 打开/关闭 电饭煲'},\n",
       " {'steps': [{'entities': [{'device': '电饭煲'}, {'mode': '煲汤模式'}],\n",
       "    'intent': 'Control-RiceCooker_Mode'},\n",
       "   {'action': 'action_RiceCookermode'}],\n",
       "  'story': '电饭煲的模式状态控制自定义对话模板 电饭煲 煲汤模式'},\n",
       " {'steps': [{'entities': [{'device': '电饭煲'}, {'time': '一个小时'}],\n",
       "    'intent': 'Control-RiceCooker_Timing'},\n",
       "   {'action': 'action_RiceCookertiming'}],\n",
       "  'story': '电饭煲的开关状态控制自定义对话模板 定时X小时做好'},\n",
       " {'steps': [{'entities': [{'device': '窗帘'}, {'operation': '打开'}],\n",
       "    'intent': 'Control-Curtain_State'},\n",
       "   {'action': 'action_curtain_state'}],\n",
       "  'story': 'open or close 窗帘--无具体需要指明的设备名称，单独的，没有附加参数值'},\n",
       " {'steps': [{'entities': [{'device': '窗帘'},\n",
       "     {'operation': '打开'},\n",
       "     {'sensorvalue': '一半'}],\n",
       "    'intent': 'Control-Curtain_State'},\n",
       "   {'action': 'action_curtain_state'}],\n",
       "  'story': 'open or close 窗帘--无具体需要指明的设备名称，单独的，带有附加参数值'},\n",
       " {'steps': [{'entities': [{'device': '窗帘'}, {'operation': '关闭'}],\n",
       "    'intent': 'Control-Curtain_State'},\n",
       "   {'action': 'action_curtain_state'}],\n",
       "  'story': 'open or close 窗帘--无具体需要指明的设备名称，单独的 没有附加的参数值'},\n",
       " {'steps': [{'entities': [{'device': '窗帘'},\n",
       "     {'operation': '关闭'},\n",
       "     {'sensorvalue': '一半'}],\n",
       "    'intent': 'Control-Curtain_State'},\n",
       "   {'action': 'action_curtain_state'}],\n",
       "  'story': 'open or close 窗帘--无具体需要指明的设备名称，单独的 没有附加的参数值'},\n",
       " {'steps': [{'entities': [{'device': '窗帘'},\n",
       "     {'date_time': '明天早上'},\n",
       "     {'time': '七点半'},\n",
       "     {'operation': '打开'}],\n",
       "    'intent': 'Control-Curtain_Timing'},\n",
       "   {'action': 'action_curtain_timing'}],\n",
       "  'story': 'timing 窗帘--定时操作 打开，单独的 没有附加的参数值'},\n",
       " {'steps': [{'entities': [{'device': '窗帘'},\n",
       "     {'date_time': '明天早上'},\n",
       "     {'time': '七点半'},\n",
       "     {'operation': '打开'},\n",
       "     {'sensorvalue': '一半'}],\n",
       "    'intent': 'Control-Curtain_Timing'},\n",
       "   {'action': 'action_curtain_timing'}],\n",
       "  'story': 'open or close 窗帘--无具体需要指明的设备名称，单独的 没有附加的参数值'},\n",
       " {'steps': [{'entities': [{'device': '烤箱'}, {'operation': '启动'}],\n",
       "    'intent': 'Control-Oven_State'},\n",
       "   {'action': 'action_ovenstate'}],\n",
       "  'story': 'open or close 烤箱--无具体需要指明的设备名称，单独的'},\n",
       " {'steps': [{'entities': [{'device': '烤箱'}, {'operation': '关闭'}],\n",
       "    'intent': 'Control-Oven_State'},\n",
       "   {'action': 'action_ovenstate'}],\n",
       "  'story': 'open or close 烤箱--无具体需要指明的设备名称，单独的'},\n",
       " {'steps': [{'entities': [{'mode': '烤鸡模式'}, {'device': '烤箱'}],\n",
       "    'intent': 'Control-Oven_Mode'},\n",
       "   {'action': 'action_ovenmode'}],\n",
       "  'story': '调整烤箱的模式(所有信息齐全，具体的烤箱设备，具体模式) 烤箱调整至XX模式 /执行'},\n",
       " {'steps': [{'entities': [{'device': '烤箱'}, {'temperature': '一百八十度'}],\n",
       "    'intent': 'Control-Oven_Temp'},\n",
       "   {'action': 'action_oventemp'}],\n",
       "  'story': '烤箱温度控制  所有信息齐全 xx烤箱 温度 设置为 X度'},\n",
       " {'steps': [{'entities': [{'address': '主卧'},\n",
       "     {'device': '空调'},\n",
       "     {'operation': '打开'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'}],\n",
       "  'story': 'open AC--具体空调设备指明'},\n",
       " {'steps': [{'entities': [{'device': '空调'}, {'operation': '打开'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'address': '客厅'}, {'device': '空调'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'action_open_ac'}],\n",
       "  'story': 'open AC2--未指明具体空调设备/询问具体设备/确认空调/执行'},\n",
       " {'steps': [{'entities': [{'device': '空调'}, {'operation': '打开'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'address': '客厅'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_open_ac'}],\n",
       "  'story': 'open AC3--未指明具体空调设备/询问具体设备/确认房间/执行'},\n",
       " {'steps': [{'entities': [{'device': '空调'}, {'operation': '打开'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'range': '所有'}], 'intent': 'inform_range'},\n",
       "   {'action': 'action_open_ac'}],\n",
       "  'story': 'open AC4--未指明具体空调设备/询问具体设备/确认全部的空调/执行'},\n",
       " {'steps': [{'entities': [{'range': '所有'},\n",
       "     {'device': '空调'},\n",
       "     {'operation': '打开'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'}],\n",
       "  'story': 'open AC3--指明所有的空调'},\n",
       " {'steps': [{'entities': [{'operation': '打开'}, {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'device': '空调'}, {'address': '客厅'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'action_open_ac'}],\n",
       "  'story': '硬编码回复空调打开--澄清具体设备/用户确认设备/执行'},\n",
       " {'steps': [{'entities': [{'operation': '打开'}, {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'address': '客厅'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_open_ac'}],\n",
       "  'story': '硬编码回复空调设备打开--澄清具体设备/用户确认房间/执行'},\n",
       " {'steps': [{'entities': [{'address': '客厅'},\n",
       "     {'device': '空调'},\n",
       "     {'operation': '关闭'}],\n",
       "    'intent': 'Control-AC_Close'},\n",
       "   {'action': 'action_close_ac'}],\n",
       "  'story': 'close AC1--具体指明空调设备'},\n",
       " {'steps': [{'entities': [{'device': '空调'}, {'operation': '关闭'}],\n",
       "    'intent': 'Control-AC_Close'},\n",
       "   {'action': 'action_close_ac'},\n",
       "   {'entities': [{'address': '客厅'}, {'device': '空调'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'action_close_ac'}],\n",
       "  'story': 'close AC2--未指明具体空调设备，需要进一步澄清'},\n",
       " {'steps': [{'entities': [{'range': '所有'},\n",
       "     {'device': '空调'},\n",
       "     {'operation': '关闭'}],\n",
       "    'intent': 'Control-AC_Close'},\n",
       "   {'action': 'action_close_ac'}],\n",
       "  'story': 'close AC3--指明所有的空调设备'},\n",
       " {'steps': [{'entities': [{'operation': '关闭'}, {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Close'},\n",
       "   {'action': 'action_close_ac'},\n",
       "   {'entities': [{'device': '空调'}, {'address': '书房'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'action_close_ac'}],\n",
       "  'story': '硬编码回复控制空调关闭 确认具体空调设备'},\n",
       " {'steps': [{'entities': [{'operation': '关闭'}, {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Close'},\n",
       "   {'action': 'action_close_ac'},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_close_ac'}],\n",
       "  'story': '硬编码回复控制空调关闭 确认具体房间'},\n",
       " {'steps': [{'entities': [{'operation': '关闭'}, {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Close'},\n",
       "   {'action': 'action_close_ac'},\n",
       "   {'entities': [{'range': '所有'}], 'intent': 'inform_range'},\n",
       "   {'action': 'action_close_ac'}],\n",
       "  'story': '硬编码回复控制空调关闭 确认全部的空调'},\n",
       " {'steps': [{'entities': [{'address': '客厅'},\n",
       "     {'device': '空调'},\n",
       "     {'mode': '制热模式'}],\n",
       "    'intent': 'Control-AC_Mode'},\n",
       "   {'action': 'acmode_form'}],\n",
       "  'story': '控制空调模式/(槽位信息齐全)/直接执行Action'},\n",
       " {'steps': [{'entities': [{'mode': '节能模式'}], 'intent': 'Control-AC_Mode'},\n",
       "   {'action': 'acmode_form'},\n",
       "   {'entities': [{'address': '客厅'}, {'device': '空调'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'acmode_form'}],\n",
       "  'story': '调整空调模式(未指明具体房间空调但目标模式齐全)/询问房间(具体空调)/确认/执行'},\n",
       " {'steps': [{'entities': [{'device': '空调'}, {'mode': '节能模式'}],\n",
       "    'intent': 'Control-AC_Mode'},\n",
       "   {'action': 'acmode_form'},\n",
       "   {'entities': [{'address': '主卧'}, {'device': '空调'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'acmode_form'}],\n",
       "  'story': 'interactive_story_1 调整空调模式(未指明具体空调设备)/询问具体设备/回复房间/调用acmode_form进行执行'},\n",
       " {'steps': [{'entities': [{'operation': '打开'},\n",
       "     {'device': '空调'},\n",
       "     {'address': '书房'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'mode': '节能模式'}], 'intent': 'Control-AC_Mode'},\n",
       "   {'action': 'acmode_form'},\n",
       "   {'entities': [{'mode': '左右扫风'}], 'intent': 'Control-AC_Mode'},\n",
       "   {'action': 'acmode_form'}],\n",
       "  'story': '空调模式控制/打开/调成xx模式/关闭xx模式'},\n",
       " {'steps': [{'entities': [{'time': '一小时'},\n",
       "     {'operation': '关闭'},\n",
       "     {'device': '空调'},\n",
       "     {'address': '主卧'}],\n",
       "    'intent': 'Control-AC_Timing'},\n",
       "   {'action': 'actiming_form'}],\n",
       "  'story': '控制空调定时操作，所有信息齐全/无需澄清槽位信息/直接执行'},\n",
       " {'steps': [{'entities': [{'time': '一小时'},\n",
       "     {'operation': '关闭'},\n",
       "     {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Timing'},\n",
       "   {'action': 'actiming_form'},\n",
       "   {'entities': [{'device': '空调'}, {'address': '主卧'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'actiming_form'}],\n",
       "  'story': '控制空调定时操作 定时关闭空调(具体空调设备信息未指明(需要明确主卧/客厅/书房) 其他信息齐全)/澄清具体设备/用户回复具体 [空调] /继续执行'},\n",
       " {'steps': [{'entities': [{'time': '一小时'},\n",
       "     {'operation': '关闭'},\n",
       "     {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Timing'},\n",
       "   {'action': 'actiming_form'},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'actiming_form'}],\n",
       "  'story': '控制空调定时操作 定时关闭空调(空调信息未指明 其他信息齐全)/澄清具体设备/用户回复 [房间] /继续执行'},\n",
       " {'steps': [{'intent': 'Control-AC_Timing'},\n",
       "   {'action': 'actiming_form'},\n",
       "   {'entities': [{'time': '一小时'}, {'operation': '关闭'}, {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Timing'},\n",
       "   {'action': 'actiming_form'},\n",
       "   {'entities': [{'device': '空调'}, {'address': '主卧'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'actiming_form'}],\n",
       "  'story': '控制空调定时操作(定时时间，定时操作，目标设备都不明确)/澄清设备/澄清操作/澄清时间'},\n",
       " {'steps': [{'entities': [{'time': '五小时'},\n",
       "     {'operation': '关闭'},\n",
       "     {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Timing'},\n",
       "   {'action': 'actiming_form'},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'actiming_form'}],\n",
       "  'story': '空调定时操作,询问具体设备,回复房间名称'},\n",
       " {'steps': [{'entities': [{'operation': '打开'}, {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'time': '一小时'}, {'operation': '关闭'}],\n",
       "    'intent': 'Control-AC_Timing'},\n",
       "   {'action': 'actiming_form'}],\n",
       "  'story': '打开空调(哪个空调设备)/主卧的(正在为您打开主卧空调)/定时一小时后关闭(已为您将主卧空调设置一小时后关闭)'},\n",
       " {'steps': [{'entities': [{'operation': '增大'},\n",
       "     {'target': '风速'},\n",
       "     {'device': '空调'},\n",
       "     {'address': '客厅'}],\n",
       "    'intent': 'Control-AC_Wind'},\n",
       "   {'action': 'action_controlDeviceWind'}],\n",
       "  'story': '调整空调的风速(所有信息齐全，具体的空调设备，风速调高或者是调低)/执行'},\n",
       " {'steps': [{'entities': [{'sensorvalue': '最大'},\n",
       "     {'target': '风速'},\n",
       "     {'device': '客厅'},\n",
       "     {'address': '客厅'}],\n",
       "    'intent': 'Control-AC_Wind'},\n",
       "   {'action': 'action_controlDeviceWind'}],\n",
       "  'story': '调整空调的风速(所有信息齐全，具体的空调设备，风速具体参数值(最大风速/最小风速/中等风速))/执行'},\n",
       " {'steps': [{'entities': [{'operation': '调高'},\n",
       "     {'target': '风速'},\n",
       "     {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Wind'},\n",
       "   {'action': 'action_controlDeviceWind'},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_controlDeviceWind'}],\n",
       "  'story': '调整空调的风速(无指明具体空调设备)/确认 房间 /执行'},\n",
       " {'steps': [{'entities': [{'operation': '调高'},\n",
       "     {'device': '空调'},\n",
       "     {'target': '风速'}],\n",
       "    'intent': 'Control-AC_Wind'},\n",
       "   {'action': 'action_controlDeviceWind'},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_controlDeviceWind'}],\n",
       "  'story': '调整空调的风速(无指明具体空调设备)/确认 房间 /执行'},\n",
       " {'steps': [{'entities': [{'operation': '调高'},\n",
       "     {'device': '空调'},\n",
       "     {'address': '主卧'},\n",
       "     {'target': '风速'}],\n",
       "    'intent': 'Control-AC_Wind'},\n",
       "   {'action': 'action_controlDeviceWind'}],\n",
       "  'story': '调整主卧空调的风速(有具体设备无操作信息)/确认 操作 /执行'},\n",
       " {'steps': [{'entities': [{'operation': '调高'},\n",
       "     {'device': '空调'},\n",
       "     {'target': '风速'}],\n",
       "    'intent': 'Control-AC_Wind'},\n",
       "   {'action': 'action_controlDeviceWind'},\n",
       "   {'entities': [{'device': '空调'}, {'address': '主卧'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'action_controlDeviceWind'}],\n",
       "  'story': '调整空调的风速(无指明具体空调设备)/确认 设备 /执行'},\n",
       " {'steps': [{'entities': [{'operation': '打开'},\n",
       "     {'device': '空调'},\n",
       "     {'address': '主卧'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'sensorvalue': '最大'}, {'target': '风速'}],\n",
       "    'intent': 'Control-AC_Wind'},\n",
       "   {'action': 'action_controlDeviceWind'},\n",
       "   {'entities': [{'sensorvalue': '最小'}, {'target': '风速'}],\n",
       "    'intent': 'Control-AC_Wind'},\n",
       "   {'action': 'action_controlDeviceWind'},\n",
       "   {'entities': [{'device': '空调'}, {'address': '主卧'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'action_controlDeviceWind'}],\n",
       "  'story': 'interactive_story_1 调整空调风速/打开/调到最大/调到最小/询问设备/确认设备/执行'},\n",
       " {'steps': [{'entities': [{'operation': '打开'},\n",
       "     {'device': '空调'},\n",
       "     {'address': '书房'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'device': '空调'},\n",
       "     {'address': '书房'},\n",
       "     {'operation': '增大'},\n",
       "     {'target': '风速'}],\n",
       "    'intent': 'Control-AC_Wind'},\n",
       "   {'action': 'action_controlDeviceWind'}],\n",
       "  'story': 'interactive_story_1 打开书房空调/书房空调风速调高'},\n",
       " {'steps': [{'entities': [{'device': '空调'},\n",
       "     {'address': '主卧'},\n",
       "     {'operation': '调高到'},\n",
       "     {'temperature': '二十度'}],\n",
       "    'intent': 'Control-AC_Temp'},\n",
       "   {'action': 'action_controlactemp'}],\n",
       "  'story': '空调温度控制  所有信息齐全 xx空调 温度 调高到 X度'},\n",
       " {'steps': [{'entities': [{'address': '客厅'},\n",
       "     {'device': '空调'},\n",
       "     {'operation': '调高'},\n",
       "     {'temperature': '一度'}],\n",
       "    'intent': 'Control-AC_Temp'},\n",
       "   {'action': 'action_controlactemp'}],\n",
       "  'story': '空调温度控制  所有信息齐全 xx空调 温度 调高 X度'},\n",
       " {'steps': [{'entities': [{'device': '空调'},\n",
       "     {'address': '主卧'},\n",
       "     {'operation': '打开'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'device': '空调'},\n",
       "     {'operation': '调高到'},\n",
       "     {'temperature': '二十五度'}],\n",
       "    'intent': 'Control-AC_Temp'},\n",
       "   {'action': 'action_controlactemp'},\n",
       "   {'entities': [{'device': '空调'}, {'operation': '调高'}, {'temperature': '两度'}],\n",
       "    'intent': 'Control-AC_Temp'},\n",
       "   {'action': 'action_controlactemp'},\n",
       "   {'entities': [{'operation': '关闭'}, {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Close'},\n",
       "   {'action': 'action_close_ac'}],\n",
       "  'story': 'interactive_story_1 空调温度控制-打开/温度调节(调高到 X度) 设备信息齐全 无需澄清/温度调节(调高 X度)/关闭'},\n",
       " {'steps': [{'entities': [{'device': '空调'},\n",
       "     {'operation': '调高到'},\n",
       "     {'temperature': '二十五度'}],\n",
       "    'intent': 'Control-AC_Temp'},\n",
       "   {'action': 'action_controlactemp'},\n",
       "   {'entities': [{'device': '空调'}, {'address': '主卧'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'action_controlactemp'}],\n",
       "  'story': '空调温度控制/温度调节(调高到 X度)device信息不全，需要进行澄清(澄清的情况为 设备)/根据填充的槽位信息进行执行'},\n",
       " {'steps': [{'entities': [{'device': '空调'},\n",
       "     {'operation': '调高到'},\n",
       "     {'temperature': '二十五度'}],\n",
       "    'intent': 'Control-AC_Temp'},\n",
       "   {'action': 'action_controlactemp'},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_controlactemp'}],\n",
       "  'story': '空调温度控制/温度调节(调高到 X度)device信息不全，需要进行澄清(澄清的情况为 房间)/温度调节(调高 X度)'},\n",
       " {'steps': [{'entities': [{'operation': '打开'}, {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'temperature': '二十五度'}, {'target': '温度'}],\n",
       "    'intent': 'Control-AC_Temp'},\n",
       "   {'action': 'action_controlactemp'}],\n",
       "  'story': '打开空调/主卧空调/把温度(调高未识别到)/AC_temp'},\n",
       " {'steps': [{'entities': [{'operation': '打开'}, {'device': '空调'}],\n",
       "    'intent': 'Control-AC_Open'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'address': '客厅'}], 'intent': 'inform_ac'},\n",
       "   {'action': 'action_open_ac'},\n",
       "   {'entities': [{'target': '温度'}, {'operation': '调高'}],\n",
       "    'intent': 'Control-AC_Temp'},\n",
       "   {'action': 'action_controlactemp'}],\n",
       "  'story': '打开空调/主卧空调/把温度(调高识别到)/AC_temp'},\n",
       " {'steps': [{'entities': [{'device': '空调'},\n",
       "     {'target': '温度'},\n",
       "     {'operation': '调高'}],\n",
       "    'intent': 'Control-AC_Temp'},\n",
       "   {'action': 'action_controlactemp'},\n",
       "   {'entities': [{'address': '主卧'}], 'intent': 'inform_room'},\n",
       "   {'action': 'action_controlactemp'}],\n",
       "  'story': '空调温度调高点/询问具体空调/回复主卧'},\n",
       " {'steps': [{'intent': 'latent_control_temp'},\n",
       "   {'action': 'action_latent_control_temp'},\n",
       "   {'intent': 'affirm'},\n",
       "   {'action': 'action_affirm_opensetaircondition'}],\n",
       "  'story': '隐式表达想要打开空调设备/询问是否打开/确认/打开空调/制热/制冷模式'},\n",
       " {'steps': [{'intent': 'latent_control_temp'},\n",
       "   {'action': 'action_latent_control_temp'},\n",
       "   {'intent': 'deny'},\n",
       "   {'action': 'action_deny_opensetaircondition'}],\n",
       "  'story': '隐式表达想要打开空调设备/询问是否打开/拒绝/槽位清空'}]"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
